package com.snda.dw.hiveapi.hiveapitest;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

public class HiveQueryResult implements Serializable {

    private List<String> columnNames = new LinkedList<String>();
    private List<List<String>> rows = new LinkedList<List<String>>();
    private double executeTimeInSecond = 0;
    private String errorMessage = null;

    public double getExecuteTimeInSecond() {
        return executeTimeInSecond;
    }

    public void setExecuteTimeInSecond(double executeTimeInSecond) {
        this.executeTimeInSecond = executeTimeInSecond;
    }

    public List<List<String>> getRows() {
        return rows;
    }

    public void setRows(List<List<String>> rows) {
        this.rows = rows;
    }

    public List<String> getColumnNames() {
        return columnNames;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void addColumnName(String name) {
        columnNames.add(name);
    }

    public void addColumnNames(List<String> names) {
        columnNames.addAll(names);
    }

    public void addRow(List<String> row) {
        rows.add(row);
    }
}
